<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title>购物车--品优购全端项目</title>
    <link rel="stylesheet" href="/lib/mui/css/mui.css">
    <link rel="stylesheet" href="/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/cart.css">
</head>

<body id="pyg_body" class>
    <!-- 头部 -->
    <header id="header" class="mui-bar mui-bar-nav">

        <h1 class="mui-title">购物车</h1>
        <button id="delete_btn" type="button" class="mui-btn mui-btn-primary mui-btn-outlined mui-pull-left">删除</button>
        <button id="edit_btn" type="button" class="mui-btn mui-btn-primary mui-btn-outlined mui-pull-right">编辑</button>
    </header>

    <div class="pyg_view">
        <!-- 地址 -->
        <div class="address">
            <div class="addr-title">配送地址</div>
            <div class="addr-content">
                <span class="fa fa-map-marker"></span>
                <div class="addr-des">
                    <div class="ad-title">默认地址</div>
                    <div class="ad-content">中国台湾省钓鱼岛</div>
                </div>
            </div>
        </div>

        <!-- 订单 -->
        <div class="order">
            <div class="order-title">订单</div>
            <div class="order-content">
                <div class="order-price">
                    总价：￥
                    <span class="total_price">00</span>
                </div>
                <a href="javascript:;" class="order-create">生成订单</a>
            </div>
        </div>

        <!-- 购物车 -->
        <div class="pyg-cart">
            <div class="cart-title">购物车</div>
            <div class="cart-content">
                <ul>
                    <!-- mainTpl占坑 -->
                </ul>
            </div>
        </div>

    </div>

    <!-- 底部 -->
    <footer class="pyg_footer">
        <a href="/index.html">
            <span class="fa fa-home"></span>
            <span class="link-name">首页</span>
        </a>
        <a href="/pages/category.html">
            <span class="fa fa-list-ul"></span>
            <span class="link-name">分类</span>
        </a>
        <a href="javascript:;">
            <span class="fa fa-shopping-cart"></span>
            <span class="link-name">首页</span>
        </a>
        <a href="javascript:;">
            <span class="fa fa-user-circle-o"></span>
            <span class="link-name">首页</span>
        </a>
    </footer>
</body>
<script src="/lib/mui/js/mui.js"></script>
<script src="/lib/arttemplate/template-web.js"></script>
<script src="/lib/zepto/zepto.js"></script>
<script src="/js/common.js"></script>
<script src="/js/cart.js"></script>

<script type="text/template" id="mainTpl">
    {{each data val index}}
    <li data-obj='{{val}}'>
        <div class="goods-chk">
            <div class="mui-input-row mui-checkbox">
                <input name="g-chk" value="Item 1" type="checkbox" checked>
            </div>
        </div>
        <div class="goods-img">
            <img src="{{val.goods_small_logo}}" alt="">
        </div>
        <div class="goods-tool">
            <div class="goods-name mui-ellipsis-2">
                {{val.goods_name}}
            </div>
            <div class="goods-nums">
                    <div class="goods-price">￥{{val.goods_price}}</div>
                    <div class="mui-numbox" data-numbox-min='1' data-numbox-max={{val.goods_number}}>
                        <!-- "-"按钮，点击可减小当前数值 -->
                        <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
                        <input class="mui-numbox-input" value="{{val.amount}}" type="number" />
                        <!-- "+"按钮，点击可增大当前数值 -->
                        <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
                    </div>
            </div>
        </div>
    </li>
    {{/each}}
</script>
</html>